function prefUtility(){
	this.prefsService = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch);
}

prefUtility.prototype.get=function(branch){
	switch (this.prefsService.getPrefType(branch)){
		case this.prefsService.PREF_INVALID: 	return undefined; 					break;	
		case this.prefsService.PREF_INT: 		return this.prefsService.getIntPref(branch); 	break;		
		case this.prefsService.PREF_STRING: 	return this.prefsService.getCharPref(branch); 	break;
		case this.prefsService.PREF_BOOL: 	return this.prefsService.getBoolPref(branch); 	break;
		default: break;
	}
}

prefUtility.prototype.set=function(branch,value){
	switch (typeof(value)){
		case "string": this.prefsService.setCharPref(branch,value); break;
		case "boolean": this.prefsService.setBoolPref(branch,value); break;
		case "number": this.prefsService.setIntPref(branch,value); break; 
		default: break;
	}
}